using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DataModels.Models
{
    [Table("Users")]
    public partial class User
    {
        public User()
        {
            this.Queries = new List<Query>();
            this.QueryCategories = new List<QueryCategory>();
        }

        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        [Required, StringLength(100)]
        public string Username { get; set; }

        [Required, StringLength(100)]
        public string FirstName { get; set; }

        [Required, StringLength(100)]
        public string LastName { get; set; }

        [Required, StringLength(250)]
        public string Password { get; set; }

        [Required, StringLength(250)]
        [DataType(DataType.EmailAddress)]
        public string EmailAddress { get; set; }

        [StringLength(50)]
        public string PhoneNumber { get; set; }

        public int AccessLevelID { get; set; }

        [Required, StringLength(50)]
        public string AccessLevelValue { get; set; }

        public bool Deleted { get; set; }
        public Nullable<System.DateTime> CreateDate { get; set; }
        public Nullable<int> CreatedByUser { get; set; }
        public Nullable<System.DateTime> UpdateDate { get; set; }
        public Nullable<int> UpdatedByUser { get; set; }
        public Nullable<System.DateTime> DeleteDate { get; set; }
        public Nullable<int> DeletedByUser { get; set; }
        public int SupportingPartnerId { get; set; }

        [ForeignKey("SupportingPartnerId")]
        public SupportingPartner SupportingPartner { get; set; }

        [ForeignKey("AccessLevelID")]
        public virtual AccessLevel AccessLevel { get; set; }
        public virtual List<Query> Queries { get; set; }
        public virtual List<QueryCategory> QueryCategories { get; set; }

        public virtual List<webpages_Roles> webpages_Roles { get; set; }
    }
}
